<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" %>
<%@ include file="baselayout/import.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="${staticPath}/assets/css/bootstrap.min.css">
<link rel="stylesheet" href="${staticPath}/assets/css/fp-index.css">
<script src="${staticPath}/assets/js/modernizr-latest.js"></script>
<script src="${staticPath}/js/jQuery-1.9.1.js"></script>
<script src="${staticPath}/js/angular.min.js"></script>
<script src=""></script>
<title>数据显示</title>
<style>
a{
text-decoration:none;
}
th,tr,td{
text-align:center ;
}

</style>
</head>
<body>
<div ng-app="myApp">
<div class="container-fluid" ng-controller="myCtrl">
<a  class="btn btn-primary" href="${staticPath}/DataSet/CurrentDir.do">当前目录</a>
<a  class="btn btn-primary" href="${staticPath}/DataSet/SumFile.do">文件数</a>
<a  class="btn btn-primary" href="${staticPath}/DataSet/SumSpace.do">总占用空间</a>
<table class="table table-hover">
  <thead>
  <th>文件名</th>
  <th>大小</th>
  <th>上传者</th>
  <th>最后修改时间</th>
  <th colspan="3">操作</th>

  </thead>
  <tbody>
  <tr ng-repeat="x in arr1">
    <td><a href="${staticPath}/DataSet/Scan.do">{{x.FileName}}</a></td>
   	<td>{{x.size}}</td>
   	<td>{{x.uploader}}</td>
   	<td>{{x.lastModifyTime}}</td>
   	<td><a href="${staticPath}/DataSet/TransArff.do">转化arff/行文件</a></td>
   	<td><a  href="${staticPath}/DataSet/Delete.do">删除</a></td>
   	<td><a  href="${staticPath}/DataSet/Establish.do?filename={{x.FileName}}">建立分类器</a></td>
  </tr>
  </tbody>
</table>
</div>
</div>
<script>
var files="${result}";
var FileSet=files.replace("[","").replace("]","").split(",");
var length=FileSet.length;
var myApp = angular.module('myApp', []);
	myApp.controller('myCtrl',['$scope', function($scope){
    $scope.arr1 =[{FileName:"",size:"",lastModifyTime:""}];
    $scope.arr1=new Array();
	for(var j=0;j<FileSet.length;j++)
    {var Name=FileSet[j].trim();
    $scope.arr1.push({"FileName":Name,"size":"","lastModifyTime":""})
    }
		
}]);
</script>
</body>
</html>